#ifndef _LT_PORTAL_H_
#define _LT_PORTAL_H_

#include <list>
#include "ltMapObject.h"

/// Forward
namespace Lotus
{
	class MapState;
	class SaveData;
}

namespace Lotus
{
	namespace Objects
	{
		class Portal: public MapObject
		{
		public:
			void onCreate();
			virtual ~Portal();

			void onMapBegin();

			/// Tranfer to new Map(auto create and return new map pointer)
			MapState* transfer(const char* mapFileName, const char* targetPortalName, std::list<MapObject*> tranferList, MapState* needDestroy = NULL);
			/// Tranfer to existing Map(don't move an object between same map by this method, please use "void localTranfer()") 
			void transfer(MapState* map, const char* targetPortalName, std::list<MapObject*> tranferList);
			/// Local tranfer
			void localTranfer(const char* targetPortalName, std::list<MapObject*> tranferList);

			static std::list<SaveData*> TransferList;
			static std::string targetPortalName;
		};
	}
}

#endif